﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BizProxy.Exceptions
{
    public class InventoryErrorItem
    {
        public Guid GoodsID { get; set; }
        public string GoodsCode { get; set; }
        public string GoodsName { get; set; }
        public Guid StorageID { get; set; }
        public decimal? PurchasePrice { get; set; }
        public string Comment { get; set; }
        public string Brand { get; set; }
        public decimal PurchaseQty { get; set; }
    }
    public class InventoryException : Exception
    {
        public InventoryException(string Error, IEnumerable<InventoryErrorItem> goodsItems)
        {
            this.Error = Error;
            this.GoodsItems = new List<InventoryErrorItem>(goodsItems);
        }
        public InventoryException(string Error, params InventoryErrorItem[] goodsItems)
        {
            this.Error = Error;
            this.GoodsItems = new List<InventoryErrorItem>(goodsItems ?? new InventoryErrorItem[0]);
        }
        public List<InventoryErrorItem> GoodsItems { get; set; }
        public string Error { get; set; }
    }
}
